package com.campsys.mapping;

import com.campsys.domain.TCourseLearnUnit;
import com.campsys.domain.param.ChapterAddParam;
import com.campsys.domain.param.LearnUnitUpdateParam;
import com.campsys.domain.param.SectionAddParam;
import com.campsys.domain.vo.ChapterListVo;
import com.campsys.domain.vo.SectionListVo;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface LearnUnitMapping {

    LearnUnitMapping INSTANCE = Mappers.getMapper(LearnUnitMapping.class);

    TCourseLearnUnit to(ChapterAddParam chapterAddParam);

    TCourseLearnUnit to(SectionAddParam sectionAddParam);

    TCourseLearnUnit to(LearnUnitUpdateParam learnUnitUpdateParam);

    List<ChapterListVo> toChapters(List<TCourseLearnUnit> list);

    List<SectionListVo> toSections(List<TCourseLearnUnit> list);
}
